gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available
authorDavid Lechner <david@lechnology.com>
Tue, 27 Apr 2021 16:37:16 +0000 (11:37 -0500)
committerDavid Lechner <david@lechnology.com>
Tue, 27 Apr 2021 16:46:39 +0000 (11:46 -0500)
When building for homebrew/linuxbrew on Ubuntu 16.04, memfd_create() is
not available and causes the build to fail.

This adds a proper check for the function.

gdk/wayland/cursor/os-compatibility.c
meson.build

index c59733964f6c8c8e299f7e6c0224ecedf2740217..3818a6170ebdb432a457330f4552013977c50a19 100644 (file)
@@ -32,7 +32,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#define HAVE_MEMFD_CREATE
 #ifdef HAVE_MEMFD_CREATE
 #include <sys/mman.h>
 #endif
index 35803e616125d114f4faee8cbc37313b2b013920..beba87461e6242fa5492f652db81df9e0d2cbe2c 100644 (file)
@@ -193,6 +193,7 @@ check_functions = [
   'getpagesize',
   'getresuid',
   'lstat',
+  'memfd_create',
   'mmap',
   'posix_fallocate',
   '_lock_file',